package ab.mes.mapper;

import ab.mes.entity.Orders;
import ab.mes.tools.Result;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrdersMapper extends BaseMapper<Orders> {
    //获取物料信息
    @Select("SELECT * FROM orders ORDER BY production_no DESC")
    public List<Orders> selectOrders1();

    @Delete("DELETE FROM orders WHERE production_no=#{production_no}")
    int deleteByNumber(Integer production_no);
    @Select("SELECT * FROM orders WHERE production_no=#{production_no}")
    List<Orders> selectByNumber(String production_no);
}
